const func = require('./func')
const api = require('./api')
// pages/mana_jg/mana_jg.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    docks:[{name:'生效中'},{name:'已失效'},{name:'已认证'},{name:'未认证'},{name:'待审核'}],
    jg_list:[],
  },

  tap_jg(e){func.tap_jg(this,e)},
  go_search_jg(e){func.go_search_jg(this,e)},
  create_jg(e){func.create_jg(this,e)},
  sel_label(e){func.sel_label(this,e)},
  


  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.jg_status = '生效中'
    this.page_no = 0
    api.load_jg_list(this,this.jg_status,this.page_no)
  },


  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    if(!this.data.no_more){
      api.load_jg_list(this,this.jg_status,this.page_no)
    }
  },

  onPullDownRefresh(){
    this.page_no = 0
    api.load_jg_list(this,this.jg_status,0)
    wx.stopPullDownRefresh()
  }

})